package com.tpf.spring.question;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

/**
 * <p> </p >
 *
 * @author : tianpf
 * @version :  A.java,v 1.0, 2021/3/26-11:08 tianpengfei Exp $
 */

@Repository
public class A implements InitializingBean {

	@Override
	public void afterPropertiesSet() throws Exception {
		System.out.println("afterPropertiesSet  ");
			a.aaa();
		System.out.println("afterPropertiesSet ... ");
	}

	A a;

	@Autowired
	public void setA(A a) {
		this.a = a;
	}

	public A() {
		System.out.println(" 构造函数   ");
	}

	public void aaa() {
		System.out.println(" aaa 方法  ");
	}
}
